using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_project_operation"), DataContract]
    public class ProjectOperation
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmProjOperId", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_oper_seq", TypeName="int")]
        public int ProjOperId { get; set; }

		[DataMember, Display(Name = "BgmProjOperCode", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_oper_code", TypeName="ntext")]
        public string Code { get; set; }

		[DataMember, Display(Name = "BgmProjOperName", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_oper_name", TypeName="ntext")]
        public string Name { get; set; }

		[DataMember, Display(Name = "BgmProjOperDescr", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_oper_descr", TypeName="ntext")]
        public string Descr { get; set; }

		[DataMember, Display(Name = "BgmProjOperDate", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_oper_date", TypeName="datetime2")]
        public Nullable<System.DateTime> ProjOperDate { get; set; }

		[DataMember, Display(Name = "StartDate", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("start_date", TypeName="datetime2")]
        public Nullable<System.DateTime> StartDate { get; set; }

		[DataMember, Display(Name = "EndDate", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("end_date", TypeName="datetime2")]
        public Nullable<System.DateTime> EndDate { get; set; }

		[DataMember, Display(Name = "AttendCount", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("attend_count", TypeName="int")]
        public Nullable<int> AttendCount { get; set; }

		[ForeignKey("Project")]
		[DataMember, Display(Name = "BgmProjId", ResourceType = typeof(Resources.ProjectOperationResource))]
        [Column("bgm_proj_seq", TypeName="int")]
        public Nullable<int> ProjId { get; set; }

		[ForeignKey("Employee")]
		[DataMember, Display(Name = "EmpId", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("emp_seq", TypeName="int")]
        public Nullable<int> EmpId { get; set; }

		[ForeignKey("JobSite")]
		[DataMember, Display(Name = "JobSiteId", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("job_site_seq", TypeName="int")]
        public Nullable<int> JobSiteId { get; set; }

		[DataMember, Display(Name = "IsUse", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("is_use", TypeName="ntext")]
        public string IsUse { get; set; }

		[DataMember, Display(Name = "WorkPlace", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("work_place", TypeName="ntext")]
        public string WorkPlace { get; set; }

		[DataMember, Display(Name = "BgmYear", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("bgm_year", TypeName="int")]
        public Nullable<int> BgYear { get; set; }

		[DataMember, Display(Name = "Scope", ResourceType = typeof(Resources.ProjectOperationResource))]
		[Column("scope", TypeName="ntext")]
        public string Scope { get; set; }

        [DataMember]
        public virtual Project Project { get; set; }

        [DataMember]
        public virtual HRM.Employee Employee { get; set; }

        [DataMember]
		public virtual HRM.JobSite JobSite { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}